-
Notifications
You must be signed in to change notification settings - Fork 32
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Simple macro benchmark #2192
Simple macro benchmark #2192
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #2192 +/- ##
==========================================
- Coverage 72.77% 67.66% -5.11%
==========================================
Files 89 101 +12
Lines 7676 8273 +597
==========================================
+ Hits 5586 5598 +12
- Misses 2090 2675 +585
Flags with carried forward coverage won't be shown. Click here to find out more.
|
965e4a4
to
8892a99
Compare
8892a99
to
e97a137
Compare
5de07b4
to
ca57b86
Compare
I ran the benchmark on main (this branch) and with reverted #2184, this gives us some data to work with:
|
Or this:
Gives: |
ca57b86
to
8a9497d
Compare
8a9497d
to
6710bd1
Compare
Implementation of a simple macro benchmark executing `ec validate image` with the fixed state and no external dependencies. For this the OCI distribution registry is run in a container with the data from the `benchmark/simple/data.tar.gz` that contains the copy of all images/blobs that the command and the policy rules currently access and the git repository. The benchmark outputs in the golang standard benchmark format that can be utilized with tools in the golang benchmarking ecosystem. Due to the global `downloadCache` variable in `internal/policy/source/source.go` the benchmark cannot be run in parallel. So only invoking the benchmark once is currently possible. Reference: https://issues.redhat.com/browse/EC-968
6710bd1
to
ac18ba7
Compare
I'll give it a quick rebase to fix the go.mod conflict, then I suggest merging. Lgtm. |
Not sure if the codecov results are accurate, but either way, not a blocker for this PR. Will merge soon if no objections. |
I tried to run it locally and hit this:
which I think is the same problem as https://issues.redhat.com/browse/EC-1041 . |
I'm hitting a different problem now trying to run this locally, so not confident about merging. Because I'm adding extra commits, I'll redo the PR with my fork, see #2304. |
Implementation of a simple macro benchmark executing
ec validate image
with the fixed state and no external dependencies.For this the OCI distribution registry is run in a container with the data from the
benchmark/simple/data.tar.gz
that contains the copy of all images/blobs that the command and the policy rules currently access and the git repository.The benchmark outputs in the golang standard benchmark format that can be utilized with tools in the golang benchmarking ecosystem.
Due to the global
downloadCache
variable ininternal/policy/source/source.go
the benchmark cannot be run in parallel. So only invoking the benchmark once is currently possible.Reference: https://issues.redhat.com/browse/EC-968